home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / Gengui / Examples / plot.gui < prev    next >
Encoding:
Text File  |  1995-10-12  |  3.9 KB  |  231 lines

  1.  
  2. #c_source
  3.  
  4. int RegionLeft,RegionTop,RegionWidth,RegionHeight;
  5.  
  6. int __stdargs Border(struct WinInfo *winfo,
  7.                      struct NewGadget *ng,
  8.                      struct GadInfo *gad,
  9.                      int left, int top, int width, int height)
  10. {
  11.    if(winfo->Render) {
  12.       DrawBevelBox(winfo->Window->RPort,ng->ng_LeftEdge,ng->ng_TopEdge,
  13.                                      ng->ng_Width,ng->ng_Height,
  14.                                      GT_VisualInfo,winfo->Visual,TAG_DONE);
  15.       RegionLeft=ng->ng_LeftEdge+2;
  16.       RegionTop=ng->ng_TopEdge+2;
  17.       RegionWidth=ng->ng_Width-4;
  18.       RegionHeight=ng->ng_Height-4;
  19.  
  20.    }
  21.  
  22.    return 0;
  23. }
  24.  
  25. #define FUNC_X 1
  26. #define FUNC_Y 2
  27. #define FUNC_Z 3
  28. #define LOW_U  4
  29. #define HIGH_U  5
  30. #define LOW_V  6
  31. #define HIGH_V  7
  32. #define STEP_U  8
  33. #define STEP_V  9
  34.  
  35. #define ROT_X   10
  36. #define ROT_Y   11
  37. #define ROT_Z   12
  38.  
  39. #define AXES    13
  40. #define OUTLINE 14
  41.  
  42. #define DEG 17
  43.  
  44. #define RENDER  15
  45. #define QUIT    16
  46.  
  47. #end_source
  48.  
  49. ProjectName Plot
  50. HBox
  51.    xspace 4
  52.    yspace 4
  53.    Custom
  54.       MinHPix 100
  55.       MinVPix 100
  56.       Custom Border
  57.    end
  58.  
  59.    bar
  60.  
  61.    Vbox
  62.       stdcol 20
  63.  
  64.       string
  65.          topcharspace 1
  66.          flags PLACETEXT_ABOVE
  67.          text "x(u,v):"
  68.          tags GTST_MaxChars,256
  69.          id FUNC_X
  70.       end
  71.  
  72.       string
  73.          topcharspace 1
  74.          flags PLACETEXT_ABOVE
  75.          text "y(u,v):"
  76.          tags GTST_MaxChars,256
  77.          id FUNC_Y
  78.       end
  79.  
  80.       string
  81.          topcharspace 1
  82.          flags PLACETEXT_ABOVE
  83.          text "z(u,v):"
  84.          tags GTST_MaxChars,256
  85.          id FUNC_Z
  86.       end
  87.  
  88.  
  89.       bar
  90.  
  91.       hbox
  92.          vchar 1
  93.       end
  94.  
  95.       hbox
  96.          stdline 1
  97.  
  98.          string
  99.             flags PLACETEXT_ABOVE
  100.             text "min u:"
  101.             tags GTST_MaxChars,256
  102.             id LOW_U
  103.          end
  104.  
  105.          string
  106.             flags PLACETEXT_ABOVE
  107.             text "max u:"
  108.             tags GTST_MaxChars,256
  109.             id HIGH_U
  110.          end
  111.       end
  112.  
  113.       hbox
  114.          vchar 1
  115.       end
  116.  
  117.       hbox
  118.          stdline 1
  119.          string
  120.             flags PLACETEXT_ABOVE
  121.             text "min v:"
  122.             tags GTST_MaxChars,256
  123.             id LOW_V
  124.          end
  125.  
  126.          string
  127.             flags PLACETEXT_ABOVE
  128.             text "max v:"
  129.             tags GTST_MaxChars,256
  130.             id HIGH_V
  131.          end
  132.  
  133.       end
  134.  
  135.       hbox
  136.          vchar 1
  137.       end
  138.  
  139.       hbox
  140.          stdline 1
  141.          integer
  142.             flags PLACETEXT_ABOVE
  143.             text "steps u:"
  144.             tags GTIN_MaxChars,2,GTIN_Number,20
  145.             id STEP_U
  146.          end
  147.  
  148.          integer
  149.             flags PLACETEXT_ABOVE
  150.             text "steps v:"
  151.             tags GTIN_MaxChars,2,GTIN_Number,20
  152.             id STEP_V
  153.          end
  154.  
  155.       end
  156.  
  157.       hbox
  158.          vchar 1
  159.       end
  160.  
  161.       hbox
  162.          stdline 1
  163.          integer
  164.             flags PLACETEXT_ABOVE
  165.             text "rot-Y:"
  166.             tags GTIN_MaxChars,3,GTIN_Number,45
  167.             id ROT_Y
  168.          end
  169.  
  170.          integer
  171.             flags PLACETEXT_ABOVE
  172.             text "rot-X:"
  173.             tags GTIN_MaxChars,3,GTIN_Number,-30
  174.             id ROT_X
  175.          end
  176.  
  177.          integer
  178.             flags PLACETEXT_ABOVE
  179.             text "rot-Z:"
  180.             tags GTIN_MaxChars,3
  181.             id ROT_Z
  182.          end
  183.  
  184.       end
  185.  
  186.       integer
  187.          topcharspace 1
  188.          flags PLACETEXT_ABOVE
  189.          text "Deg.:"
  190.          tags GTIN_MaxChars,3
  191.          id DEG
  192.       end
  193.  
  194.       hbox
  195.  
  196.          vchar 2
  197.          vpix  8
  198.  
  199.          hbox
  200.          end
  201.  
  202.          vbox
  203.             checkbox
  204.                text "Axes:"
  205.                tags GTCB_Checked,TRUE
  206.                id AXES
  207.             end
  208.             checkbox
  209.                text "Outline:"
  210.                tags GTCB_Checked,TRUE
  211.                id OUTLINE
  212.             end
  213.          end
  214.       end
  215.  
  216.       button
  217.          text "Render"
  218.          id RENDER
  219.       end
  220.  
  221.       hbox
  222.       end
  223.  
  224.       button
  225.          text "Quit"
  226.          id QUIT
  227.       end
  228.    end
  229.  
  230. end
  231.